package lab.gene.history.action;

import java.util.List;

import lab.gene.service.impl.GeneMinipreServiceImpl;

import lab.gene.pojo.GeneMinipre;

import com.opensymphony.xwork2.ActionSupport;

public class ViewGeneMiniprepHistoryAction extends ActionSupport{
	
	private static final long serialVersionUID = 1L;
	private List<GeneMinipre> historyList = null;
	private String geneName = null;
	private String type = null;
	
	public String execute() {
		String result = null;
		GeneMinipreServiceImpl service = new GeneMinipreServiceImpl();
		historyList = service.getGeneMinipreHistory(geneName, type);
		switch (type) {
		case "A":
			result = "successA";
			break;
		case "B":
			result = "successB";
			break;
		case "C":
			result = "successC";
			break;
		case "D":
			result = "successD";
			break;
		}
		return result;
	}
	public List<GeneMinipre> getHistoryList() {
		return historyList;
	}
	public void setHistoryList(List<GeneMinipre> historyList) {
		this.historyList = historyList;
	}
	public String getGeneName() {
		return geneName;
	}
	public void setGeneName(String geneName) {
		this.geneName = geneName;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

}
